package com.codeczx.customviewdemo;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.ViewGroup;

/**
 * Created by win10 on 2017/6/27.
 */

public class EasyRelativeLayoutParams extends ViewGroup.MarginLayoutParams {

    public static final int CENTER = 0;
    public static final int LEFT_TOP = 1;
    public static final int RIGHT_TOP = 2;
    public static final int LEFT_BOTTOM = 3;
    public static final int RIGHT_BOTTOM = 4;

    public int position = LEFT_TOP;

    public EasyRelativeLayoutParams(Context c, AttributeSet attrs) {
        super(c, attrs);
        TypedArray array = c.obtainStyledAttributes(attrs,R.styleable.EasyRelativeLayout);
        position = array.getInt(R.styleable.EasyRelativeLayout_layout_position,position);
        array.recycle();
    }

    public EasyRelativeLayoutParams(int width, int height) {
        super(width, height);
    }

    public EasyRelativeLayoutParams(ViewGroup.LayoutParams source) {
        super(source);
    }
}
